﻿using System.Collections.Generic;
using FlexPlatform.Shared.Validation;

namespace FlexPlatform.Shared.Presenters
{
    /// <summary>
    /// Interface for the presenter of an DataEntity or a property of a DataEntity.
    /// </summary>
    public interface IPresenter
    {
        /// <summary>
        /// The name of a Entity or a property (field).
        /// </summary>
        string Name { get; }

        /// <summary>
        /// The validation results for a property or a data entity.
        /// </summary>
        IEnumerable<IValidationResult> ValidationResults { get; set; }

        /// <summary>
        /// The list of proposed values.
        /// </summary>
        IEnumerable<object> ProposedValues { get; set; }

        /// <summary>
        /// Read-only property specifying the busy state.
        /// </summary>
        bool IsBusy { get; }
    }
}
